import acroMLClassMethod from "./acroML.ClassMethod.mjs";
import Highcharts from 'highcharts';
let translateProp=acroMLClassMethod.translateProp;

function t_chart(t, com) { 
  let t2=function(prop,propName){
    return translateProp(t,prop,propName);
  }

  t2(com.title,'textStr');
  t2(com.subtitle,'textStr');
  for(let i=0;i<com.xAxis.length;i++){
    let x=com.xAxis[i];
    if (x.axisTitle)
      t2(x.axisTitle,'textStr');
  }
  for(let i=0;i<com.yAxis.length;i++){
    let y=com.yAxis[i];
    if (y.axisTitle)
      t2(y.axisTitle,'textStr');
  }
  com.render();
}

acroMLClassMethod.register(Highcharts.chart,t_chart);

let methods={
  t_chart
}
export default methods;
export {
  t_chart
}